import re

str1 = 'Vlan520                172.20.52.19    YES NVRAM  up                    up      '


x = re.match('(\w+)\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s+(YES|NO)\s+(\w*)\s+(\w*)\s+(\w*)',str1).groups()

print('-' * 80)
print(x)

print('{0:5} : {1}'.format('接口',x[0]))
print('{0:5} : {1}'.format('IP地址',x[1]))
print('{0:5} : {1}'.format('状态',x[-2]))


"""
--------------------------------------------------------------------------------
('Vlan520', '172.20.52.19', 'YES', 'NVRAM', 'up', 'up')
接口    : Vlan520
IP地址  : 172.20.52.19
状态    : up

Process finished with exit code 0
"""